home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / ARexx Tutorial / TuteRexx / CDO.dopus5 next >
Text File  |  1998-08-07  |  1KB  |  29 lines

  1. /*
  2.  $VER: CDO.dopus5 1.0 (6.8.98) D.Clarke
  3.  Changes your shell path to lister path
  4. */
  5. options results
  6. options failat 21
  7. if ~show('P','DOPUS.1') then do        /* Check for DOPUS.1 ARexx port */
  8.   Say "DirectoryOpus is not running."  /* Warn user if DOpus not running */
  9.   Exit (5)                             /* Exit with result code = 5 (Warn) */
  10.   end                                  /* End this loop */
  11. address 'DOPUS.1'
  12. lister query active                         /* Look for an Active lister */
  13. if result ~= '' & result ~= 'RESULT' then call gotone /* We've found one */
  14. lister query source                          /* Look for a Source lister */
  15. if result ~= '' & result ~= 'RESULT' then call gotone /* We've found one */
  16. lister query dest                       /* Look for a Destination lister */
  17. if result ~= '' & result ~= 'RESULT' then call gotone /* We've found one */
  18. lister query all                         /* Look for any non-busy lister */
  19. if result ~= '' & result ~= 'RESULT' then call gotone /* We've found one */
  20. dopus request '"No non-busy listers found" OK'     /* We didn't find any */
  21. exit (5)                                             /* suitable listers */
  22.  
  23. gotone:
  24. parse var result handle .     /* Parse the first lister handle */
  25. lister query handle path      /* Ask for it's current path */
  26. path = strip(result,B,'"')    /* Store path, strip "'s */
  27. push path                     /* Push the result into the input stream */
  28. exit
  29.